import {} from './spu.api';



export const renderSpuTypeCompProps = ({ formActionType, formModel }) => {
  return {
    type: 'select',
    dictCode: 'spu_type',
    onChange: (value) => {
      console.log('商品类型:', value);
      const { updateSchema } = formActionType;
      updateSchema([
        {
          field: 'bonusAmount',
        },
      ]);
      //商品类型为实物是提成金额为10元
      if (value == 'physical_goods') {
        formModel.bonusAmount = 11;
      } else {
        formModel.bonusAmount = '';
      }
    },
  };
}
